{% extends "portal/portalbase.html" %}
{% comment %}

Main page to authenticate users.

{% endcomment %}
{% block styles %}
    {{ block.super }}
    <style type="text/css" title="currentStyle">
        @import "/static/DataTables-1.9.3/examples/examples_support/themes/smoothness/jquery-ui-1.8.4.custom.css";
        @import "/static/DataTables-1.9.3/media/css/demo_table_jui.css";
        @import "/static/DataTables-1.9.3/media/css/demo_page.css";
    </style>
{% endblock %}

{% block scripts %}
    {{ block.super }}
    <script type="text/javascript" language="javascript" src="/static/DataTables-1.9.3/media/js/jquery.dataTables.js" charset="utf-8"></script>
    <script type="text/javascript" charset="utf-8">
        $(document).ready(function() {
            $('#cmdbtab').dataTable({
                'bJQueryUI': true,
                'sPaginationType': 'full_numbers',
                'bServerSide': true,
                "bDeferRender": true,
                'sAjaxSource': "{% url get_cmdb_list %}",
                'oLanguage': {
                    "sProcessing":   "处理中...",     "sLengthMenu":   "显示 _MENU_ 项结果",     "sZeroRecords":  "没有匹配结果",     "sInfo":         "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",     "sInfoEmpty":    "显示第 0 至 0 项结果，共 0 项",     "sInfoFiltered": "(由 _MAX_ 项结果过滤)",     "sInfoPostFix":  "",     "sSearch":       "搜索:",     "sUrl":          "",     "oPaginate": {         "sFirst":    "首页",         "sPrevious": "上页",         "sNext":     "下页",         "sLast":     "末页"    }
                },
                "aoColumns": [
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": true,"sWidth": "auto"},
                    { "bSearchable": true,"sWidth": "auto"},
                    { "bSearchable": true,"sWidth": "auto"},
                    { "bSearchable": true,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"},
                    { "bSearchable": false,"sWidth": "auto"}

                ]
            });

            $(window).bind('resize', function () {     table.fnAdjustColumnSizing();   } );
        } );
    </script>



{% endblock %}

{% block body %}
    {{ block.super }}
    <table style="white-space: nowrap" cellpadding="0" cellspacing="0" border="0" class="display" id="cmdbtab">
        <thead>
        <tr>
            <th>环境编码       </th>
            <th>应用名称       </th>
            <th>系统IP         </th>
            <th>操作系统类型        </th>
            <th>主机名      </th>
            <th>CPU           </th>
            <th>内存           </th>
            <th>根盘大小      </th>
            <th>存储类型   </th>
            <th>物理位置      </th>
            <th>机柜位置     </th>
            <th>机架位置     </th>
            <th>机器位置     </th>
            <th>单元          </th>
            <th>服务IP     </th>
            <th>制造商   </th>
            <th>经销商        </th>
            <th>机器型号  </th>
            <th>机器代码   </th>
            <th>序列号  </th>
            <th>外观    </th>
            <th>架构类型      </th>
            <th>分区信息     </th>
            <th>存储大小   </th>
            <th>应用级别      </th>
            <th>域       </th>
            <th>网络备注       </th>
            <th>网关       </th>
            <th>子网掩码          </th>
            <th>服务端口   </th>
            <th>是否HA            </th>
            <th>高可用IP1         </th>
            <th>高可用 IP2         </th>
            <th>硬件负责人</th>
            <th>系统负责人  </th>
            <th>应用负责人     </th>
            <th>管理网网关 </th>
            <th>管理网掩码    </th>
            <th>维修级别   </th>
            <th>过保日期    </th>
            <th>数据库信息        </th>
            <th>中间件信息</th>
            <th>非系统用户   </th>
            <th>备注          </th>
        </tr>
        </thead>
        <tbody>

        </tbody>
    </table>

   {% comment %}
   <div class="pagination">
    <span class="step-links">
        {% if cmdbs.has_previous %}
            <a href="?page={{ cmdbs.previous_page_number }}">previous</a>
        {% endif %}

        <span class="current">
            Page {{ cmdbs.number }} of {{ cmdbs.paginator.num_pages }}.
        </span>

        {% if cmdbs.has_next %}
            <a href="?page={{ cmdbs.next_page_number }}">next</a>
        {% endif %}
    </span>
    </div>
{% endcomment %}

{% endblock %}

